Sequence diagram view definition¶
Overview¶
With Next Design, you can add an existing model as a lifeline in the sequence diagram or select a message according to the model to which the message is sent. For example, you can create a sequence diagram with the following operation.
Example of creating a sequence diagram using a component and its input port
- Add [Component] defined as model as a lifeline.
- When adding a message between components, select the destination port of the message from [In Port] provided by [Component].
Example of creating sequence diagram using class and its method
- Add [Class] defined as a model as a lifeline.
- When adding a message between classes, select the method to be called from [Method] provided by [Class].
To be able to add a specific type of model as a lifeline, set the type of model that can be associated with a lifeline in the view definition of the sequence diagram. This is called a lifeline mapping definition.
To be able to select a message according to the model of the message destination, set a field that can be associated with the message for each model type in the view definition of the sequence diagram. This is called a message mapping definition.
The following describes the method of defining the view of the sequence diagram in the following order.
- Set the type of model that can be added to the lifeline
- Set message options for each model type
Set the type of model that can be added to the lifeline¶
To set up a lifeline mapping definition so that you can add a particular type of model as a lifeline in a sequence diagram:
Operating procedure
- Display the target sequence diagram in the editor.
- Click Sequence Diagram> Mapping> Edit Lifeline Setting from the ribbon to open the Edit Lifeline Setting dialog.
- Click the + icon at the bottom right of the Mapping list to open the New Lifeline Mapping dialog.
- Select Class from the Mapping Target pull-down list.
- Click the [...] button of [Data Type] and select the type of model (eg component) to be added as a lifeline.
- Change [Figure] and [Model Name] as necessary, and click the [OK] button.
- Once you have configured the lifeline mapping definition, the Reference tab in the toolbox will show the models that you can add as lifelines.
Set message options for each model type¶
To set the message mapping definition so that the message can be selected according to the model of the message destination, perform the following steps.
Operating procedure
- Display the target sequence diagram in the editor.
- From the ribbon, click Sequence Diagram> Mapping> Message Settings to open the Message Settings dialog, where the Model types that can be added to the lifeline are listed in Mapping. I will.
- Move the pointer to the Target field to associate message with cell and click the edit icon to open the Message Mapping Definition Settings dialog.
- From the Target Field pull-down list, select the field to associate with the message.
- From the Title pull-down list, select the field to display as the message label.
- Select [Parameter] and [Return type] as necessary, and click the [OK] button.
- After setting the message mapping definition, the choices will be displayed when adding the message.
Note
- Before setting the message mapping definition, it is necessary to set the model types that can be added in the lifeline mapping definition.